<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "loan".
 *
 * @property integer $id
 * @property string $name
 * @property string $mobile
 * @property integer $sex
 * @property string $loan_amount
 * @property string $loan_time
 * @property string $loan_purpose
 * @property string $remark
 * @property string $ip
 * @property integer $create_time
 * @property integer $update_time
 * @property integer $status
 */
class Loan extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'loan';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['sex', 'create_time', 'update_time', 'status'], 'integer'],
            [['name', 'mobile'], 'string', 'max' => 100],
            [['loan_amount', 'loan_time', 'loan_purpose'], 'string', 'max' => 256],
            [['remark'], 'string'],
            [['ip'], 'string', 'max' => 128],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '姓名',
            'mobile' => '电话',
            'sex' => '性别',
            'loan_amount' => '借款金额',
            'loan_time' => '借款期限',
            'loan_purpose' => '借款用途',
            'remark' => '备注',
            'ip' => 'Ip',
            'create_time' => '申请时间',
            'update_time' => '更新时间',
            'status' => '状态',
        ];
    }
}
